﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>模块级权限控制</title> <#include "../common/Resources.ftl"/>
<link
	href="http://192.168.0.42/resource/greensystem/LigerUI/lib/ligerUI/skins/Aqua/css/ligerui-all.css"
	rel="stylesheet" type="text/css" />
<link
	href="http://192.168.0.42/resource/greensystem/LigerUI/lib/ligerUI/skins/ligerui-icons.css"
	rel="stylesheet" type="text/css" />
<script type="text/javascript"
	src="${base}/scripts/common/ListUI.liger.js"></script>
<script type="text/javascript"
	src="${base}/scripts/plugin/jquery.form.js"></script>
<script type="text/javascript"
	src="${base}/scripts/plugin/ligerUI/js/ligerui.all.js"></script>
<script type="text/javascript" src="${base}/scripts/common/custom.js"></script>
<script type="text/javascript"
	src="${base}/scripts/module/manage/FunPermissionOAdd.js"></script>
<body>
	<div class="list_Content">
		<div class="list-box">

			<div class="list-box-hd">
			
			<div class="tool">
				<div class="fl"><a class="mini-button" href="${ctx}/funPermission/manager"><span class="mini-button-text">返回</span></a></div>
				  <div class="fr">
						<div class="breadCrumb">您的位置：<a href="${ctx}/funPermission/manager">组织及岗位授权</a> &gt; <span class="current">模块级控制权限 </span></div>
					</div>
				</div>
			</div>

			<div class="list-box-bd">
				<!--tab -->
				<div class="tabs">
					<ul>
						<li class="current"><a href="javascript:void(0);">模块级权限控制</a>
						</li>
						<li><a href="${ctx}/funPermission/sAdd?controUnit=${controUnit!''}&displayName=${displayName!''}&orgId=${org.id}&positionId=${position.id!''}">数据查看权限控制</a>
						</li>
					</ul>
                  	<div class="fl" style="padding-left:15px; padding-top:5px">组织：${displayName} 岗位：${position.name}</div>
				</div>
				<div id="tableContainer"></div>
			</div>
		</div>
	</div>
         <input type="hidden"id="longNumber" value="${org.longNumber!''}"/>
         <input type="hidden"id="controUnit" value="${controUnit!''}"/>
         <input type="hidden"id="positionId" value="${position.id!''}"/>
         <input type="hidden"id="moduleId" />
         
</body>
<script>
	$(document).ready(function() {
		com.green.web.FunPermissionOAdd.init();
	});
	function selectResource(obj){
		var resourceList="";
		var moduleId="";
		for(var i=0;i<obj.length;i++){
			if(resourceList=="")
			{
				resourceList=obj[i].id;	
				moduleId=obj[i].moduleId;
			}else{
				resourceList=resourceList+","+obj[i].id;
			}
		}
		if(moduleId==""){
			moduleId=$("#moduleId").val();
		}
		$.ajax({
			type : "POST",
			url : ctx + "/funPermission/saveFunPermission",
			data : {
				"positionId" : $("#positionId").val(),
				"moduleId" : moduleId,
				"resourceList" : resourceList
			},
			success : function(date) {
				var ss = $.trim(date.message);
				if (ss == 1 || ss == "1") {
					art.dialog.optTips('您的操作已经成功', 3, "success");
				} else {
					art.dialog.optTips('操作失败，请稍后再试', 3, "failure");
				}
			}
		});
	}
</script>
</html>
